package com.eas.biz.service.grade.impl;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;

import com.eas.biz.framework.cache.CacheConfig;
import com.eas.biz.framework.cache.CacheProvider;
import com.eas.biz.framework.cache.CacheStore;
import com.eas.biz.service.grade.interfaces.GradeService;

public class GradeCacheServiceImpl extends GradeServiceImpl implements GradeService {

    @Autowired
    private CacheProvider cacheProvider;

    private CacheStore cacheStore;

    @PostConstruct
    public void init() {
        CacheConfig config = new CacheConfig();
        config.setName("gradeInfo");
        config.setRefreshSeconds(24 * 60 * 60);
        config.setCapacity(50);
        cacheStore = cacheProvider.create(config);
    }

}
